- Author:
- Weiwei Ai <wai484@aucklanduni.ac.nz>
- Date:
- 2024-05-27 15:41:10+12:00
- Desc:
- Update readme file
- Permanent Source URI:
- http://models.cellml.org/workspace/b65/rawfile/b7ec0e1728a7d93333c64719ad8e2ef696837d3f/Electrogenic cotransporter/CellMLV2/SGLT1_ss_fast.py
# The content of this file was generated using the Python profile of libCellML 0.5.0.
from enum import Enum
from math import *
__version__ = "0.4.0"
LIBCELLML_VERSION = "0.5.0"
STATE_COUNT = 1
VARIABLE_COUNT = 54
class VariableType(Enum):
VARIABLE_OF_INTEGRATION = 0
STATE = 1
CONSTANT = 2
COMPUTED_CONSTANT = 3
ALGEBRAIC = 4
VOI_INFO = {"name": "t", "units": "second", "component": "params_BG", "type": VariableType.VARIABLE_OF_INTEGRATION}
STATE_INFO = [
{"name": "V0_Vm", "units": "volt", "component": "params_BG", "type": VariableType.STATE}
]
VARIABLE_INFO = [
{"name": "q_Nai", "units": "fmol", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "Nai", "units": "mM", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "V_i", "units": "pL", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_Nao", "units": "fmol", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "Nao", "units": "mM", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "V_o", "units": "pL", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_Glci", "units": "fmol", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "Glci", "units": "mM", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_Glco", "units": "fmol", "component": "params_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "Glco", "units": "mM", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "R", "units": "J_per_K_mol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "T", "units": "kelvin", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "F", "units": "C_per_mol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_Nai", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_Nao", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_Glci", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_Glco", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_1", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_1", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_2", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_2", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_3", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_3", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_4", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_4", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_5", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_5", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "K_6", "units": "per_fmol_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "q_init_6", "units": "fmol", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "z_zf1", "units": "dimensionless", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "z_zf6", "units": "dimensionless", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "kappa_r1", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "kappa_r2", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "kappa_r3", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "kappa_r4", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "kappa_r5", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "kappa_r6", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "kappa_r7", "units": "fmol_per_s_1", "component": "params_BG", "type": VariableType.CONSTANT},
{"name": "Ii", "units": "fA", "component": "SGLT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "v", "units": "fmol_per_s", "component": "SGLT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "z_1", "units": "dimensionless", "component": "SGLT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "z_2", "units": "dimensionless", "component": "SGLT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "Ii_1", "units": "fA", "component": "SGLT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "v_1", "units": "fmol_per_s", "component": "SGLT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "sigma", "units": "dimensionless", "component": "SGLT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "q_tot", "units": "fmol", "component": "SGLT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "v_max", "units": "fmol_per_s", "component": "SGLT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "Q_Na_o", "units": "dimensionless", "component": "SGLT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "Q_Na_i", "units": "dimensionless", "component": "SGLT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "Q_Glc_o", "units": "dimensionless", "component": "SGLT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "Q_Glc_i", "units": "dimensionless", "component": "SGLT1_BG", "type": VariableType.COMPUTED_CONSTANT},
{"name": "B", "units": "dimensionless", "component": "SGLT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "A", "units": "dimensionless", "component": "SGLT1_BG", "type": VariableType.ALGEBRAIC},
{"name": "q_1", "units": "fmol", "component": "SGLT1_BG", "type": VariableType.ALGEBRAIC}
]
def create_states_array():
return [nan]*STATE_COUNT
def create_variables_array():
return [nan]*VARIABLE_COUNT
def initialise_variables(states, rates, variables):
variables[1] = 20.0
variables[2] = 8.5e5
variables[4] = 100.0
variables[5] = 8.5e5
variables[7] = 10.0e-3
variables[9] = 1.0e-12
variables[10] = 8.31
variables[11] = 293.0
variables[12] = 96485.0
variables[13] = 1.413e-07
variables[14] = 1.413e-07
variables[15] = 5.715e-06
variables[16] = 5.715e-06
variables[17] = 3.660
variables[18] = 16.605778811026234
variables[19] = 3.301e+02
variables[20] = 16.605778811026234
variables[21] = 3.207e+02
variables[22] = 16.605778811026234
variables[23] = 3.207e+02
variables[24] = 16.605778811026234
variables[25] = 9.053e+02
variables[26] = 16.605778811026234
variables[27] = 0.314
variables[28] = 16.605778811026234
variables[29] = 0.3
variables[30] = 0.7
variables[31] = 1.515e+04
variables[32] = 6.237e+02
variables[33] = 0.156
variables[34] = 2.495e+04
variables[35] = 1.105e+02
variables[36] = 9.562
variables[37] = 9.089e-04
states[0] = -0.15
def compute_computed_constants(variables):
variables[0] = variables[1]*variables[2]
variables[3] = variables[4]*variables[5]
variables[6] = variables[7]*variables[2]
variables[8] = variables[9]*variables[5]
variables[40] = variables[29]
variables[41] = variables[30]
variables[45] = variables[18]+variables[20]+variables[22]+variables[24]+variables[26]+variables[28]
variables[46] = variables[45]*variables[36]*variables[17]
variables[47] = variables[14]*variables[3]
variables[48] = variables[13]*variables[0]
variables[49] = variables[16]*variables[8]
variables[50] = variables[15]*variables[6]
def compute_rates(voi, states, rates, variables):
rates[0] = 0.01/1.0
def compute_variables(voi, states, rates, variables):
variables[44] = variables[12]*states[0]/(variables[10]*variables[11])
variables[51] = (exp(2.0*variables[40]*variables[44])+pow(variables[47], 2.0)*(variables[17]/variables[19]+variables[17]/variables[21]*variables[49]))*(pow(variables[48], 2.0)*variables[50]*exp(variables[41]*variables[44])+variables[36]/variables[33])+(variables[17]/variables[27]+pow(variables[48], 2.0)*(variables[17]/variables[25]+variables[17]/variables[23]*variables[50]))*(pow(variables[47], 2.0)*variables[49]*exp(variables[41]*variables[44])+variables[36]/variables[33]*exp(2.0*variables[44]))
variables[39] = variables[46]*(pow(variables[47], 2.0)*variables[49]-pow(variables[48], 2.0)*variables[50]*exp(2.0*variables[44]))/variables[51]
variables[38] = 2.0*(variables[40]+variables[41])*variables[12]*variables[39]
variables[52] = (1.0+variables[17]/variables[19]*pow(variables[47], 2.0)*exp(-2.0*variables[40]*variables[44])+variables[17]/variables[21]*pow(variables[47], 2.0)*variables[49]*exp(-2.0*variables[40]*variables[44]))*(variables[50]+variables[36]/variables[33]*pow(variables[48], -2.0)*exp(-variables[41]*variables[44]))+(variables[17]/variables[23]*variables[50]+variables[17]/variables[25]+variables[17]/variables[27]*pow(variables[48], -2.0))*(pow(variables[47], 2.0)*variables[49]*exp(-2.0*variables[40]*variables[44])+variables[36]/variables[33]*exp(variables[41]*variables[44]))
variables[53] = variables[45]/variables[52]*(variables[50]+variables[36]/variables[33]*pow(variables[48], -2.0)*exp(-variables[41]*variables[44]))
variables[43] = variables[33]*variables[17]*(pow(variables[47], 2.0)*variables[49]*exp(-2.0*variables[40]*variables[44])*(variables[50]+variables[36]/variables[33]*pow(variables[48], -2.0)*exp(-variables[41]*variables[44]))-variables[50]*(pow(variables[47], 2.0)*variables[49]*exp(-2.0*variables[40]*variables[44])+variables[36]/variables[33]*exp(variables[41]*variables[44])))*variables[53]/(variables[50]+variables[36]/variables[33]*pow(variables[48], -2.0)*exp(-variables[41]*variables[44]))
variables[42] = 2.0*(variables[40]+variables[41])*variables[12]*variables[43]